import { request } from '@/utils/request.js'

// 获取单个商品退款类型信息
export function apiGetRefundTypeInfo(data = {}) {
	return request({
		url: "/orderRefund/getRefundTypeInfo",
		data
	})
}

// 获取单个商品退款信息
export function apiGetRefundInfo(data = {}) {
	return request({
		url: "/orderRefund/getRefundInfo",
		data
	})
}

// 提交单个商品退款信息
export function apiApply(data = {}) {
	return request({
		url: "/orderRefund/apply",
		data,
		method: "post",
	})
}

// 获取全部商品退款类型信息
export function apiGetAllRefundTypeInfo(data = {}) {
	return request({
		url: "/orderRefund/getAllRefundTypeInfo",
		data
	})
}

// 获取全部商品退款信息
export function apiGetAllRefundInfo(data = {}) {
	return request({
		url: "/orderRefund/getAllRefundInfo",
		data
	})
}

// 提交全部商品退款信息
export function apiApplyAll(data = {}) {
	return request({
		url: "/orderRefund/applyAll",
		data,
		method: "post",
	})
}

// 获取售后订单列表
export function apiGetRefundList(data = {}) {
	return request({
		url: "/orderRefund/refundList",
		data
	})
}

// 取消退款
export function apiCancelRefund(data = {}) {
	return request({
		url: "/orderRefund/cancelRefund",
		data,
		method: "post",
	})
}

// 获取售后订单详情
export function apiGetRefundDetail(data = {}) {
	return request({
		url: "/orderRefund/refundDetail",
		data
	})
}


// 售后获取物流公司列表
export function apiGetReturnSendInfo(data = {}) {
	return request({
		url: "/orderRefund/getReturnSendInfo",
		data
	})
}

// 售后提交物流单号
export function apiReturnSend(data = {}) {
	return request({
		url: "/orderRefund/returnSend",
		data,
		method: "post",
	})
}